Skip to content

gh-62912: fix pure-Python operator.index()#148023

Open
skirpichev wants to merge 1 commit into
python:mainfrom
skirpichev:pyoperator.index/62912
Open

gh-62912: fix pure-Python operator.index()#148023
skirpichev wants to merge 1 commit into
python:mainfrom
skirpichev:pyoperator.index/62912

Conversation

@skirpichev

@skirpichev skirpichev commented Apr 2, 2026

Copy link
Copy Markdown
Member

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@skirpichev

Copy link
Copy Markdown
Member Author

CC @serhiy-storchaka

This is based on your patch, especially tests. But I believe that this simplified version is now ok. Strictly speaking, new docs lie for some broken int's subclasses like:

class BadInt(int):
    def __index__(self):
        return 42

We need to fix also concat/iconcat. But I would prefer to do this in a separate PR.

@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant